6f2fca7e99fa2d3696a3601607d48ead1057a998,src/me/ryanhamshire/griefprevention/command/CommandClaimFlagPlayer.java,CommandClaimFlagPlayer,execute,#CommandSource#CommandContext#,62

Before Change


        String name = ctx.<String>getOne("player").get();
        String flag = ctx.<String>getOne("flag").orElse(null);
        String source = ctx.<String>getOne("source").orElse(null);
        String target = ctx.<String>getOne("target").orElse(null);
        if (source != null && source.equalsIgnoreCase(target)) {
            source = null;
        }

After Change


        String name = ctx.<String>getOne("player").get();
        String flag = ctx.<String>getOne("flag").orElse(null);
        String source = ctx.<String>getOne("source").orElse(null);
        String target = null;
        // Workaround command API issue not handling onlyOne arguments with sequences properly
        List<String> targetValues = new ArrayList<>(ctx.<String>getAll("target"));
        if (targetValues.size() > 1) {
            target = targetValues.get(1);
        } else {
            target = targetValues.get(0);
        }

        if (source != null && source.equalsIgnoreCase("any")) {